﻿var model = avalon.define({
    $id: 'cache',
    cache_menus: [],
    clear: null,
    clear_success: null,
    generation: function (cache) {
        $.post('/filecache/ReBuild', { cache: cache }).success(function () {
            success_msg(cache+'页面清除成功');
        });
    }
});

model.clear = function (cache) {
    $.post('/site/removecache', { cache: cache }).success(model.clear_success);
}
model.clear_success = function () {
    success_msg('操作成功');
}

avalon.scan();